<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
        <script>
        function f() {
            var c = document.getElementById("s1");
            var arr = c.getElementsByTagName('font');
            var brr = c.getElementsByTagName('span');
            var crr = c.getElementsByTagName('div');
            var a = parseInt(arr[0].innerText)+parseInt(brr[0].innerText);
            a+=parseInt(crr[0].innerText);
            alert(a);
        }
    </script>
</head>
<body onload="setTimeout('f()',5000)">
    <div id="s1">
        <font>103</font>
        <span>204</span>
        <div>305</div>
    </div>
</body>
</html>